Skip to main content

JSONToArray

Type

function

Summary

Parse JSON to a LiveCode array

Syntax

JSONToArray(<pJSON>)

Description

JSON arrays are translated to LiveCode numerically indexed arrays with keys 1...N and JSON objects are translated to LiveCode array key -> value pairs.

Parameters

NameTypeDescription

pJSON

A UTF8 encoded JSON string

Examples

local tProfile
put url "https://graph.facebook.com/me" into tProfile
if the result begins with "error" then
-- handle error
else
put JSONToArray(tProfile) into tProfile
-- do something interesting with the profile
end if
Thank you for your feedback!

Was this page helpful?